package com.yjht.common.result;

import com.baomidou.mybatisplus.plugins.Page;
import lombok.Data;

/**
 * 页码vo
 * @author lengleng
 */
@Data
public class PageVO {
	private Integer page = 1;
	private Integer rows = 10;
	private String sort;
	private String order = "asc";

	/**
	 * 转化成mybatis plus中的page
	 */
	public <T> Page<T> toPage() {
		return new Page<>(page, rows, sort, "asc".equalsIgnoreCase(order));
	}
}
